// Start of file MSOmniProvSource.h
// File: MSOmniProvDS.h
// This file contains the implementation for the CMSOmniProvSource class the data source...
//

#ifndef __CMSOmniProvSource_H_
#define __CMSOmniProvSource_H_
#include "resource.h"       // main symbols
#include "MSOmniProvRS.h"


// CMSOmniProvSource
class ATL_NO_VTABLE CMSOmniProvSource : 
	public CComObjectRootEx<CComSingleThreadModel>,
	public CComCoClass<CMSOmniProvSource, &CLSID_MSOmniProv>,
	public IDBCreateSessionImpl<CMSOmniProvSource, CMSOmniProvSession>,
	public IDBInitializeImpl<CMSOmniProvSource>,
	public IDBPropertiesImpl<CMSOmniProvSource>,
	public IPersistImpl<CMSOmniProvSource>,
	public IInternalConnectionImpl<CMSOmniProvSource>
{
public:
	HRESULT FinalConstruct()
	{
		return FInit();
	}
DECLARE_REGISTRY_RESOURCEID(IDR_MSOMNIPROV)
BEGIN_PROPSET_MAP(CMSOmniProvSource)
	BEGIN_PROPERTY_SET(DBPROPSET_DATASOURCEINFO)
		PROPERTY_INFO_ENTRY(ACTIVESESSIONS)
		PROPERTY_INFO_ENTRY_VALUE(BYREFACCESSORS, VARIANT_TRUE)
		PROPERTY_INFO_ENTRY_VALUE(DATASOURCEREADONLY, VARIANT_FALSE)
		PROPERTY_INFO_ENTRY_VALUE(DSOTHREADMODEL,DBPROPVAL_RT_FREETHREAD)
		PROPERTY_INFO_ENTRY_VALUE(OUTPUTPARAMETERAVAILABILITY, DBPROPVAL_OA_NOTSUPPORTED)
		PROPERTY_INFO_ENTRY_VALUE(PROVIDEROLEDBVER, OLESTR("1.00"))
		PROPERTY_INFO_ENTRY_VALUE(PROVIDERVER, OLESTR("1.00"))
		PROPERTY_INFO_ENTRY_VALUE(SUPPORTEDTXNISOLEVELS,DBPROPVAL_TR_NONE)
		PROPERTY_INFO_ENTRY_VALUE(SQLSUPPORT,DBPROPVAL_SQL_NONE)  // Build-up SQL Support does not matter...
		PROPERTY_INFO_ENTRY_VALUE(USERNAME,OLESTR("Guest"))
	END_PROPERTY_SET(DBPROPSET_DATASOURCEINFO)
	BEGIN_PROPERTY_SET(DBPROPSET_DBINIT)
		PROPERTY_INFO_ENTRY_VALUE(AUTH_PASSWORD,OLESTR(""))
		PROPERTY_INFO_ENTRY_VALUE(AUTH_PERSIST_SENSITIVE_AUTHINFO,VARIANT_FALSE)
		PROPERTY_INFO_ENTRY_VALUE(AUTH_USERID,OLESTR("Guest"))
		PROPERTY_INFO_ENTRY_VALUE(INIT_DATASOURCE,OLESTR("Local"))
		PROPERTY_INFO_ENTRY(INIT_HWND)
		PROPERTY_INFO_ENTRY(INIT_LCID)
		PROPERTY_INFO_ENTRY_EX(INIT_OLEDBSERVICES,VT_I4,DBPROPFLAGS_DBINIT | DBPROPFLAGS_REQUIRED,	DBPROPVAL_OS_ENABLEALL,0)
		PROPERTY_INFO_ENTRY_VALUE(INIT_LOCATION,OLESTR(".\\"))
		PROPERTY_INFO_ENTRY_VALUE(INIT_MODE, DB_MODE_READWRITE)
		PROPERTY_INFO_ENTRY_VALUE(INIT_PROMPT,DBPROMPT_NOPROMPT)
		PROPERTY_INFO_ENTRY_VALUE(INIT_PROVIDERSTRING,OLESTR(""))
		PROPERTY_INFO_ENTRY(INIT_TIMEOUT)
	END_PROPERTY_SET(DBPROPSET_DBINIT)
	CHAIN_PROPERTY_SET(CMSOmniProvCommand)
END_PROPSET_MAP()
BEGIN_COM_MAP(CMSOmniProvSource)
	COM_INTERFACE_ENTRY(IDBCreateSession)
	COM_INTERFACE_ENTRY(IDBInitialize)
	COM_INTERFACE_ENTRY(IDBProperties)
	COM_INTERFACE_ENTRY(IPersist)
	COM_INTERFACE_ENTRY(IInternalConnection)
END_COM_MAP()
public:
};
#endif //__CMSOmniProvSource_H_

// End of file MSOmniProvSource.h